home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / backall.doc < prev    next >
Text File  |  1995-03-31  |  5KB  |  114 lines

  1. (Comp.sys.handhelds) 
  2. Item: 2695 by darrylo at hpnmdla.hp.com 
  3. Author: [Darryl Okahata] 
  4.   Subj: How to backup the ENTIRE HP-48SX memory 
  5.   Date: Mon Apr 08 1991 
  6.  
  7.      Here is a beta-release of a program to backup the ENTIRE contents (libs 
  8. and all) of an HP-48SX.  It's not perfect, it's huge (about 1000 bytes), and 
  9. it's probably inefficient (I just slapped this together). 
  10.  
  11.      Also, while I've tried to work out any bugs, there's no guarantee that it 
  12. works.  ;-) 
  13.  
  14.      The big advantage of these functions, over previously-released ones, is 
  15. that you only need as much memory as the largest library/port variable to do a 
  16. backup, as the libraries/port variables are saved in separate files and not as 
  17. a concatenated list in main memory. 
  18.  
  19.      The code at the end of this message contains two functions: BACKUP and 
  20. RECOVER.  In order to use these functions, you need to backup to a kermit 
  21. SERVER; you must place the destination machine in kermit SERVER mode to use 
  22. these routines.  If you do not have a kermit that supports SERVER mode, you 
  23. cannot use these routines.  You must also use binary transfer mode; if you 
  24. accidentally use ASCII mode, the transfer will take hours.  Also, the clock 
  25. display must be turned off, due to the archive bug; if the display is turned 
  26. on, the clock will be turned off, and you will be asked to redo the operation. 
  27.  
  28.      You press BACKUP to archive the contents of your HP-48SX.  BACKUP sends 
  29. each variable/library to the kermit server, one by one (it first checks to see 
  30. if you have enough memory, though).  They are stored in files named like: 
  31.  
  32.      Lpnnn 
  33.  
  34.      Where "p" is the port number (0..2), and "nnn" is a number from 1 to 
  35. however many variables are in the port.  As each port object is sent to the 
  36. server, a note of its type (variable vs library) is made and is saved away 
  37. (this is used to restore the backup).  After all port objects have been saved, 
  38. the flags are saved in a variable, and an ARCHIVE is done (the ARCHIVE file 
  39. name is hard-coded to "BACKUP").  The HP-48SX will also terminate the kermit 
  40. server at the end of the backup. 
  41.  
  42.      Filename collisions are a problem here.  I strongly suggest starting the 
  43. kermit server in an empty directory before starting the backup. 
  44.  
  45.      Here's a summary of the backup process: 
  46.  
  47. 1.  Make sure the HP-48SX is using wire/binary transfer. 
  48.  
  49. 2.  Place kermit into SERVER mode. 
  50.  
  51. 3.  Press BACKUP.  Have a cup of coffee while you wait.  If the suppress error 
  52.     beep flag (-56) is not set, the calculator will beep when the full backup 
  53.     is complete. 
  54.  
  55.      To restore the contents of your HP-48SX, you do the following: 
  56.  
  57. 1.  Go to the directory containing the backup files. 
  58.  
  59. 2.  Using kermit, transfer the "backup" archive back to the HP-48SX, and 
  60.     RESTORE it. 
  61.  
  62. 3.  Put kermit into server mode. 
  63.  
  64. 4.  Go to the HP-48SX directory that contains the BACKUP and RECOVER functions. 
  65.  
  66. 5.  Press RECOVER.  The calculator will transfer the necessary files and place 
  67.     the objects into the correct ports.  That's it. 
  68.  
  69.  
  70. ***** Known problems: 
  71.  
  72. * This program backs up EVERYTHING in RAM (of course, it doesn't touch ROM). 
  73.   It backs up *ALL* libraries, backup objects, other variables, etc..  You 
  74.   cannot tell it to not backup something, other than purging the object, or 
  75.   pulling the RAM card out of the calculator. 
  76.  
  77. * This program is huge, due partly to the extensive checks that makes sure that 
  78.   enough memory is present before doing the BACKUP/RECOVER.  Perhaps these 
  79.   checks should be deleted (but I like having user-friendly programs ...)? 
  80.  
  81. * No kermit error checking is done. 
  82.  
  83. * Currently, some of the constants used to estimate the minimum amount of RAM 
  84.   needed are stored in variables ("M" and "S").  Perhaps these should be 
  85.   hard-coded? 
  86.  
  87. * The current set of functions can be placed anywhere, as long as the directory 
  88.   hierarchy is maintained.  Some RAM can be saved if these functions were 
  89.   hard-coded to work in a particular directory (such as "{HOME BACKUP}").  Does 
  90.   anyone have any preferences? 
  91.  
  92. * Does anyone know how to force binary kermit transfers? 
  93.  
  94. * I consider this to be a beta-release.  As such, the code is not commented. 
  95.  
  96.      -- Darryl Okahata 
  97.         UUCP: {hplabs!, hpcea!, hpfcla!} hpnmd!darrylo 
  98.         Internet: darrylo%hpnmd@relay.hp.com 
  99.  
  100. DISCLAIMER: this message is the author's personal opinion and does not 
  101. constitute the support, opinion or policy of Hewlett-Packard or of the little 
  102. green men that have been following him all day. 
  103.  
  104. ---------- 
  105.   Resp: 1 of 1 by cook at hplvec.LVLD.HP.COM 
  106. Author: [Steve Cook] 
  107.   Date: Sun Apr 28 1991 22:53 
  108.  Lines: 3 
  109.  
  110. I found that the hp48 has to be in STD mode before the backup routine will work 
  111. properly.  This is a handy program.  Thanks for your effort, Darryl. 
  112.  
  113. [STD is in the program on disk.  -jkh-] 
  114.